package com.longcai.controller.fuyoupay;


import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.longcai.bean.ApiResult;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouWeixinRecord;
import com.longcai.entity.payment.fuyou.request.ClyjFuyouWithdraw;
import com.longcai.service.fuyoupay.ClyjFuyouWeixinRecordService;
import com.longcai.service.fuyoupay.ClyjFuyouWithdrawService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * <p>
 *  交易查询接口（非代付）
 * </p>
 *
 * @author f
 * @since 2019-04-23
 */
@Controller
@RequestMapping("/clyjFuyouWeixinRecord")
public class ClyjFuyouWeixinRecordController {
	@Autowired  
	private ClyjFuyouWeixinRecordService clyjFuyouWeixinRecordService;
	@RequestMapping("/weixinRecordSearch")
	@ResponseBody
	public ApiResult<?> AddSmallCompanyRegister (@RequestBody JSONObject params){
		List<ClyjFuyouWeixinRecord> cfwd=clyjFuyouWeixinRecordService.checkout(params);
		for (ClyjFuyouWeixinRecord clyjFuyouWeixinRecord : cfwd) {
			boolean b=clyjFuyouWeixinRecordService.insert(clyjFuyouWeixinRecord);
		}
		if (cfwd!=null&&cfwd.size()>0) {
			
			return ApiResult.success(cfwd);
		}
		return ApiResult.fail("查询失败");
	}
}

